let shopList = [];

const getShopCount = () => {
	var count = 0;
	for (var index in shopList) {
		var item = shopList[index];
		if (null != item.count) {
			count += item.count;
		}
	}
	return count;
}

const getShopTotalMoney = () => {
	var money = 0.0
	for (var index in shopList) {
		var item = shopList[index];
		if (null != item.count && null != item.price) {
			money += item.count * item.price;
		}
	}
	return money;
}

export {
	shopList,
	getShopCount,
	getShopTotalMoney
}